package com.peoit.honeycomb.dto;

/**
 * Created by Bing.Zeng on 2015/9/26.
 */
public class CommonPageQueryDto extends BaseDto {
    private int pageSize =Config.default_pageSize;
    private int offset = 0;

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getOffset() {
        return offset;
    }

    public void setOffset(int offset) {
        if(offset==0 || offset ==1){
            this.offset = 0;
        }else {
            this.offset =(offset - 1) * getPageSize();
        }
    }
}
